//***********************************************************************
//	File:		Grenade.h
//	Author:		
//	Course:		SGP 1405
//	Purpose:	
//***********************************************************************
//***********************************************************************
//	Purposfully left blank for all comments regarding this file 
//	
//	
//	
//***********************************************************************



#pragma once
#include "Moveable.h"
class Grenade :
	public Moveable
{
public:
	Grenade(float posX = -1, float posY = -1);
	~Grenade() = default;
	Grenade(const Grenade&) = default;
	Grenade& operator =(const Grenade&) = default; 

	//Type 
	int GetType() const { return ENT_GRENADE; }

	//Interface
	void Update(float dt);
	void Render();
	void HandleCollision(const IEntity* pOther);
	void HandleEvent();
	SGD::Rectangle GetRect() const;
	void ModifyHealth(float hpAmount);
	void ApplyFriction(float dt);

	//Grenade specific
	void Explode(); 

	//Accessors
	float GetExplodeTimer			(void) {return m_fExplodeTimer;}
	float GetExplodeCDL				(void) {return m_fExplodeCDL;}
	float GetRadius					(void) {return m_fRadius;}
	bool  GetIsFrozen				(void) {return m_bIsFrozen;}

	//Mutators
	void SetExplodeTimer(float et)	{ m_fExplodeTimer = et; }
	void SetExplodeCDL(float eCDL)	{ m_fExplodeCDL = eCDL; }
	void SetRadius(float rad)		{ m_fRadius = rad; }
	void SetIsFrozen(bool isfro)	{ m_bIsFrozen = isfro; }
private:
	float m_fExplodeTimer	 = 0.0f;
	float m_fExplodeCDL		 = 0.0f; 
	float m_fRadius			 = 0.0f;
	bool  m_bIsFrozen		 = false; 
};

